package com.ms.service.module.analysisgroup;

import java.util.HashMap;

import com.ms.game.itembox.AccountItemChangeWay;
import com.ms.game.itembox.ItemChangeWay;

/**
 * 統計物品變化量的資料
 */
public class ItemChangeData {
	
	/**物品名稱*/
	private String itemName;

	/**這個物品的水晶值(水晶卡)*/
	private int crystalCount;
	
	/**這個物品的C幣值(C幣卡)*/
	private String goldCoin;
	
	/**角色物品變化方式的累積值*/
	private HashMap<ItemChangeWay, Integer> counter = new HashMap<ItemChangeWay, Integer>();
	
	/**帳號物品變化方式的累積值*/
	private HashMap<AccountItemChangeWay, Integer> accountCounter = new HashMap<AccountItemChangeWay, Integer>();
	
	public void addCount(ItemChangeWay changeWay, int addAmount){
		if(this.counter.get(changeWay) == null)
			this.counter.put(changeWay, addAmount);
		else{
			int amount = this.counter.get(changeWay) + addAmount;
			this.counter.put(changeWay, amount);
		}
	}
	
	public void addCount(AccountItemChangeWay changeWay, int addAmount){
		if(this.accountCounter.get(changeWay) == null)
			this.accountCounter.put(changeWay, addAmount);
		else{
			int amount = this.accountCounter.get(changeWay) + addAmount;
			this.accountCounter.put(changeWay, amount);
		}
	}
	
	public HashMap<AccountItemChangeWay, Integer> getAccountCounter(){
		return accountCounter;
	}

	public HashMap<ItemChangeWay, Integer> getCounter() {
		return counter;
	}

	public int getCrystalCount() {
		return crystalCount;
	}

	public void setCrystalCount(int crystalCount) {
		this.crystalCount = crystalCount;
	}

	public String getGoldCoin() {
		return goldCoin;
	}

	public void setGoldCoin(String goldCoin) {
		this.goldCoin = goldCoin;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	
}
